<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title></title>

  <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
  <div class="row">
    <div class="col-md-1"></div>
    <div class="col-md-10">
      <nav class="navbar navbar-default">
        <div class="container-fluid">
          <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">学生管理系统</a>
          </div>

          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
              <li><a href="${pageContext.request.contextPath}/allUsers/allUser">用户管理 <span class="sr-only">(current)</span></a></li>
              <li><a href="${pageContext.request.contextPath}/stud/allStud">学生管理<span class="sr-only">(current)</span></a></li>
              <li><a href="${pageContext.request.contextPath}/clazz/allClazz">班级管理<span class="sr-only">(current)</span></a></li>
              <li class="active"><a href="${pageContext.request.contextPath}/grade/allGrade">年级管理<span class="sr-only">(current)</span></a></li>
            </ul>
            <!-- <form class="navbar-form navbar-left">
               <div class="form-group">
                 <input type="text" class="form-control" placeholder="Search">
               </div>
               <button type="submit" class="btn btn-default">Submit</button>
             </form> -->
            <ul class="nav navbar-nav navbar-right">
              <li><a href="${pageContext.request.contextPath}/user/goOut" style="font-size: 20px;color: blueviolet">注销</a></li>
            </ul>
          </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
      </nav>
      <div>
        <h1>
          <small>年级列表</small>
        </h1>
      </div>
      <div class="row">
        <div class="col-md-4 column">
          <a class="btn btn-primary" href="${pageContext.request.contextPath}/grade/toAddGrade">新增</a>
        </div>
      </div>
      <table class="table table-hover table-striped">
        <thead>
        <tr>
<%--          <th>年级编号</th>--%>
          <th>年级名</th>
          <th>备注</th>
          <th>操作</th>
        </tr>
        </thead>

        <tbody>
        <c:forEach var="grade" items="${requestScope.get('glist')}">
          <tr>
<%--            <td>${grade.getWxy_id()}</td>--%>
            <td>${grade.getWxy_name()}</td>
            <td>${grade.getWxy_remark()}</td>
            <td>
              <a href="${pageContext.request.contextPath}/grade/toUpdateGrade/${grade.getWxy_id()}">更改</a> |
              <a href="${pageContext.request.contextPath}/grade/del/${grade.getWxy_id()}" onclick="return confirm('确定将此记录删除?')">删除</a>
            </td>
          </tr>
        </c:forEach>
        </tbody>
      </table>
      <nav aria-label="Page navigation">
        <ul class="pagination">
          <li>
            <a href="#" aria-label="Previous">
              <span aria-hidden="true">&laquo;</span>
            </a>
          </li>
          <li><a href="#">1</a></li>
          <li>
            <a href="#" aria-label="Next">
              <span aria-hidden="true">&raquo;</span>
            </a>
          </li>
        </ul>
      </nav>

    </div>
    <div class="col-md-1"></div>
  </div>

</div>
</body>
</html>
